package com.fr.schedule;

import com.fr.schedule.dao.JdbcDaoManager;
import com.fr.third.org.quartz.Scheduler;
import com.fr.web.platform.entry.EntryManager;

public abstract class ScheduleContext
{
  private static EntryManager entryManager;
  private static JdbcDaoManager jdbcDaoManager;
  private static Scheduler scheduler;

  public static EntryManager getEntryManager()
  {
    if (entryManager == null)
      entryManager = new EntryManager();
    return entryManager;
  }

  public static JdbcDaoManager getJdbcDaoManager()
  {
    if (jdbcDaoManager == null)
      jdbcDaoManager = new JdbcDaoManager();
    return jdbcDaoManager;
  }

  public static void refreshDatabaseConnection()
  {
    jdbcDaoManager = new JdbcDaoManager();
  }

  public static void setScheduler(Scheduler paramScheduler)
  {
    scheduler = paramScheduler;
  }

  public static Scheduler getScheduler()
  {
    return scheduler;
  }
}